package com.ms.p2p.service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ms.common.exception.NoticeException;
import com.ms.p2p.provider.RbacProvider;
import com.ms.p2p.provider.YeahpaysProvider;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by daimajia on 2017/6/30.
 */
@Service
public class RbacService  {

    @Reference
    RbacProvider rbacProvider;

    public boolean checkPremission(Integer depart,String premission){
        if(rbacProvider==null){
            throw  new NoticeException("系统出现错误");
        }
        return rbacProvider.checkPremission(depart,
                premission);

    }

}
